package com.example.timeskilltest.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.timeskilltest.model.Orders;
import com.example.timeskilltest.service.OrdersService;

@RestController
@RequestMapping("/orders")
public class OrdersController {

    @Autowired
    private OrdersService ordersService;

    @RequestMapping("/list")
    public List<Orders> list() {
        List<Orders> list = ordersService.list();
        return list;
    }

}
